package com.ls.dao.user;

import com.ls.pojo.Role;
import com.ls.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 李朔
 * @version 1.0
 */
public interface UserDao {
    //得到要登录的用户
    public User getLoginUser(Connection connection,String userCode) throws SQLException;
    public int updatePwd(Connection connection,int id,String password) throws SQLException;
    //查询用户名或者用户角色总数
    public int getUserCount(Connection connection,String username,int userRole) throws SQLException;

    public List<User> getUserList(Connection connection, String userName, int userRole, int currentPageNo, int pageSize)throws Exception;

    public boolean addUser(Connection connection,User user) throws SQLException;

}
